package cn.gcjxsc.common.consts;

/**
 * 支付类型.
 *
 * @author pumbaa
 * @since 1.0
 */
public enum PayType {
    /**
     * 在线支付
     */
    ONLINE(1),
    /**
     * 到付
     */
    COLLECTED(2);
    private int type;

    PayType(int type) {
        this.type = type;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public static PayType fromCode(int type) {
        return type == 1 ? ONLINE : COLLECTED;
    }
}
